import { get, post } from '@/utils/request';

/**
 * 套餐权限管理 API
 */

// 获取套餐的权限ID列表
export const getPlanPermissions = (planId: string) => {
  return get<string[]>(`/plans/${planId}/permissions`);
};

// 为套餐分配权限
export const assignPermissions = (data: { planId: string; permissionIds: string[] }) => {
  const { planId, permissionIds } = data;
  return post(`/plans/${planId}/permissions`, { permissionIds });
};
